package com.xinyue.dz.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.xinyue.dz.bean.Role;
import com.xinyue.dz.dao.RoleDao;
import com.xinyue.dz.service.RoleService;

@Service
@Transactional
public class RoleServiceImpl implements RoleService{
	@Autowired
	RoleDao dao;

	@Override
	public void save(Role entity) {
		dao.save(entity);
	}

	@Override
	public Integer deleteById(int roleId) {
		return dao.deleteById(roleId);
	}

	@Override
	public void update(Role entity) {
		dao.update(entity);
	}
	
	@Override
	public void saveOrUpdate(Role entity) {
		dao.saveOrUpdate(entity);
	}

	@Override
	public Role queryById(int roleId) {
		return dao.queryById(roleId);
	}

	@Override
	public List<Role> queryAll(int begin, int count) {
		return dao.queryAll(begin, count);
	}

	@Override
	public Long queryCount() {
		return dao.queryCount();
	}
}